package tomcatmanage;

import org.eclipse.jface.action.ICoolBarManager;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.application.ActionBarAdvisor;
import org.eclipse.ui.application.IActionBarConfigurer;

import component.TomcatManageEditor;
import ui.view.TomcatUiEdit;

public class ApplicationActionBarAdvisor extends ActionBarAdvisor {

	public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
		super(configurer);
	}
	
	@Override
	protected void makeActions(IWorkbenchWindow window) {
		super.makeActions(window);
		try {
			window.getActivePage().openEditor(TomcatManageEditor.EDITOR_INPUT, TomcatManageEditor.class.getName());
			window.getActivePage().openEditor(TomcatUiEdit.EDITOR_INPUT, TomcatUiEdit.class.getName());
		} catch (Exception e) {
			e.printStackTrace();
		}
//		System.out.println(ApplicationActionBarAdvisor.class.getResource("/"));
//		System.out.println(ApplicationActionBarAdvisor.class.getResource("."));
//		System.out.println(System.getProperty("user.dir"));
//		System.out.println(System.getProperty("java.io.tmpdir"));
//		System.out.println(System.getProperty("java.library.path"));
//		System.out.println(System.getProperty("java.class.path"));
	}
	
	@Override
	protected void fillMenuBar(IMenuManager menuBar) {
		super.fillMenuBar(menuBar);
	}
	
	@Override
	protected void fillCoolBar(ICoolBarManager coolBar) {
		super.fillCoolBar(coolBar);
	}

}

